package org.apm.data.util;

public final class StringUtil {

    private StringUtil() {}

    public static boolean isEmpty(final String str) {
        return null == str | "".equals(str);
    }

    public static boolean isExist(final String str) {
        return null != str && !"".equals(str);
    }

    /** judge multi string existed or not. */
    public static boolean areExist(final String... strs) {
        for (String str : strs) {
            if (null == str | "".equals(str)) {
                return false;
            }
        }
        return true;
    }

    /** judge the compare is one of the strs or not. */
    public static boolean multEquals(final String compare, final String... strs) {
        for (String str : strs) {
            if (str.equals(compare)) {
                return true;
            }
        }
        return false;
    }
}
